package cn.sirun.com.fca.account.model.bind;

import com.tencent.cloud.iov.util.ObjectUtils;

import cn.sirun.com.fca.account.model.base.CarData;

/**
 * @author vinsonhuang
 * @date 2018/6/5
 */
public class CarActivateInfo {

    private String carId;

    private CarData carInfo;

    public CarActivateInfo() {
    }

    public CarActivateInfo(String carId, CarData carInfo) {
        this.carId = carId;
        this.carInfo = carInfo;
    }

    public CarActivateInfo(CarActivateInfo carActivateInfo) {
        this.carId = carActivateInfo.getCarId();
        this.carInfo = new CarData(carActivateInfo.getCarInfo());
    }

    public String getCarId() {
        return carId;
    }

    public void setCarId(String carId) {
        this.carId = carId;
    }

    public CarData getCarInfo() {
        return carInfo;
    }

    public void setCarInfo(CarData carInfo) {
        this.carInfo = carInfo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CarActivateInfo that = (CarActivateInfo) o;
        return ObjectUtils.equals(carId, that.carId) &&
                ObjectUtils.equals(carInfo, that.carInfo);
    }

    @Override
    public int hashCode() {
        return ObjectUtils.hash(carId, carInfo);
    }

    @Override
    public String toString() {
        return "CarActivateInfo{" +
                "carId=" + carId +
                ", carInfo=" + carInfo +
                '}';
    }
}
